package Demo2;

import Demo1.Running;
import Demo1.Swimming;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 殇
 * Date: 2025-07-10
 * Time: 17:12
 */
public class Frog implements Running, Swimming {
    public String name;
    @Override
    public void run() {
        System.out.println(this.name+"正在跑");
    }

    @Override
    public void swim() {
        System.out.println(this.name+"正在游泳");
    }

    public Frog(String name) {
        this.name = name;
    }

    public static void main(String[] args) {
        Frog frog=new Frog("小白");
        frog.swim();
        frog.run();
    }
}
